package com.yksj.healthtalk.adapter;

import java.util.List;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.Button;
import android.widget.TextView;

import com.yksj.healthtalk.entity.ShopEntityClassify;
import com.yksj.healthtalk.ui.R;

public class ShopCarAdapter extends BaseAdapter {

	private Context mContext;
	private List<ShopEntityClassify> mListEntitys;
	private LayoutInflater mInflater;
	public ShopCarAdapter(Context context,List<ShopEntityClassify> listEntitys) {
		mListEntitys=listEntitys;
		mContext=context;
		mInflater = LayoutInflater.from(context);
	}

	@Override
	public int getCount() {
		return mListEntitys.size();
	}

	@Override
	public Object getItem(int position) {
		return mListEntitys.get(position);
	}

	@Override
	public long getItemId(int position) {
		return position;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		if(convertView==null){
			convertView=mInflater.inflate(R.layout.shop_car_adapter_item, null);
			TextView name=(TextView)convertView.findViewById(R.id.name);
			TextView desc=(TextView)convertView.findViewById(R.id.desc);
			TextView moeny_num=(TextView)convertView.findViewById(R.id.moeny_num);
			TextView num=(TextView)convertView.findViewById(R.id.num);
			Button add=(Button)convertView.findViewById(R.id.add);
			Button num_cha=(Button)convertView.findViewById(R.id.num_cha);
			Button jian=(Button)convertView.findViewById(R.id.jian);
			Button delte=(Button)convertView.findViewById(R.id.delte);
			TextView all_money_num=(TextView)convertView.findViewById(R.id.all_money_num);
		}else{
			
		}
		
		return convertView;
	}

}
